package kxfang.com.common.bean;

import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;

import java.util.List;

/**
 * Created by ZJ
 * on 2020/3/26
 * Class Content 推荐商家model
 */
public class HomeStoreModel implements Parcelable {

    private String ID;
    private String Logo;
    private String StoreName;
    private String StarNum;
    private String SaleNum;
    private String StartPrice;
    private String Distributionfee;
    private String DistributionfeeStr;
    private String Label;
    private String Address;
    private String RUserID;
    private String Statu;
    private String CMemo;
    private String AreaName;
    private String EnterNature;
    private String LicenseUrl;
    private String BrandName;
    private String FullName;
    private String Indsutry;
    private String Contractor;
    private String Phone;
    private String Indrotuce;
    private String LegalPerson;
    private String RegisterTime;
    private String RegisterMoney;
    private String ManageState;
    private String CreditCode;
    private String Distance;
    private String Lat;
    private String Lng;
    private String ServerPromise;
    private String DiscountInfo;
    private String RankInfo;
    private String EvaluateStr;
    private int PageIndex;
    private int PageSize;
    private String SortFiled;
    private boolean IsDesc;
    private int BusinessStatus;
    private String Distributiontype;
    private List<GoodsListModel> GoodsList;
    private String DistanceStr;

    public int getBusinessStatus() {
        return BusinessStatus;
    }

    public void setBusinessStatus(int businessStatus) {
        BusinessStatus = businessStatus;
    }

    protected HomeStoreModel(Parcel in) {
        ID = in.readString();
        Logo = in.readString();
        StoreName = in.readString();
        StarNum = in.readString();
        SaleNum = in.readString();
        StartPrice = in.readString();
        Distributionfee = in.readString();
        DistributionfeeStr = in.readString();
        Label = in.readString();
        Address = in.readString();
        RUserID = in.readString();
        Statu = in.readString();
        CMemo = in.readString();
        AreaName = in.readString();
        EnterNature = in.readString();
        LicenseUrl = in.readString();
        BrandName = in.readString();
        FullName = in.readString();
        Indsutry = in.readString();
        Contractor = in.readString();
        Phone = in.readString();
        Indrotuce = in.readString();
        LegalPerson = in.readString();
        RegisterTime = in.readString();
        RegisterMoney = in.readString();
        ManageState = in.readString();
        CreditCode = in.readString();
        Distance = in.readString();
        Lat = in.readString();
        Lng = in.readString();
        ServerPromise = in.readString();
        DiscountInfo = in.readString();
        RankInfo = in.readString();
        EvaluateStr = in.readString();
        PageIndex = in.readInt();
        PageSize = in.readInt();
        SortFiled = in.readString();
        IsDesc = in.readByte() != 0;
        BusinessStatus = in.readInt();
        Distributiontype = in.readString();
        GoodsList = in.createTypedArrayList(GoodsListModel.CREATOR);
        DistanceStr = in.readString();
    }

    public static final Creator<HomeStoreModel> CREATOR = new Creator<HomeStoreModel>() {
        @Override
        public HomeStoreModel createFromParcel(Parcel in) {
            return new HomeStoreModel(in);
        }

        @Override
        public HomeStoreModel[] newArray(int size) {
            return new HomeStoreModel[size];
        }
    };

    public String getDistanceStr() {
        return DistanceStr;
    }

    public void setDistanceStr(String distanceStr) {
        DistanceStr = distanceStr;
    }

    public String getDiscountInfo() {
        return DiscountInfo;
    }

    public void setDiscountInfo(String discountInfo) {
        DiscountInfo = discountInfo;
    }

    public String getRankInfo() {
        return RankInfo;
    }

    public void setRankInfo(String rankInfo) {
        RankInfo = rankInfo;
    }

    public String getEvaluateStr() {
        return EvaluateStr;
    }

    public void setEvaluateStr(String evaluateStr) {
        EvaluateStr = evaluateStr;
    }

    public boolean isDesc() {
        return IsDesc;
    }

    public void setDesc(boolean desc) {
        IsDesc = desc;
    }


    public String getID() {
        return ID;
    }

    public void setID(String ID) {
        this.ID = ID;
    }

    public String getLogo() {
        return Logo;
    }

    public void setLogo(String Logo) {
        this.Logo = Logo;
    }

    public String getStoreName() {
        return StoreName;
    }

    public void setStoreName(String StoreName) {
        this.StoreName = StoreName;
    }

    public String getStarNum() {
        return StarNum;
    }

    public void setStarNum(String StarNum) {
        this.StarNum = StarNum;
    }

    public String getSaleNum() {
        return SaleNum;
    }

    public void setSaleNum(String SaleNum) {
        this.SaleNum = SaleNum;
    }

    public String getStartPrice() {
        return StartPrice;
    }

    public void setStartPrice(String StartPrice) {
        this.StartPrice = StartPrice;
    }

    public String getDistributionfee() {
        return Distributionfee;
    }

    public void setDistributionfee(String Distributionfee) {
        this.Distributionfee = Distributionfee;
    }

    public String getLabel() {
        return Label;
    }

    public void setLabel(String Label) {
        this.Label = Label;
    }

    public String getAddress() {
        return Address;
    }

    public void setAddress(String Address) {
        this.Address = Address;
    }

    public String getRUserID() {
        return RUserID;
    }

    public void setRUserID(String RUserID) {
        this.RUserID = RUserID;
    }

    public String getStatu() {
        return Statu;
    }

    public void setStatu(String Statu) {
        this.Statu = Statu;
    }

    public String getCMemo() {
        return CMemo;
    }

    public void setCMemo(String CMemo) {
        this.CMemo = CMemo;
    }

    public String getAreaName() {
        return AreaName;
    }

    public void setAreaName(String AreaName) {
        this.AreaName = AreaName;
    }

    public String getEnterNature() {
        return EnterNature;
    }

    public void setEnterNature(String EnterNature) {
        this.EnterNature = EnterNature;
    }

    public String getLicenseUrl() {
        return LicenseUrl;
    }

    public void setLicenseUrl(String LicenseUrl) {
        this.LicenseUrl = LicenseUrl;
    }

    public String getBrandName() {
        return BrandName;
    }

    public void setBrandName(String BrandName) {
        this.BrandName = BrandName;
    }

    public String getFullName() {
        return FullName;
    }

    public void setFullName(String FullName) {
        this.FullName = FullName;
    }

    public String getIndsutry() {
        return Indsutry;
    }

    public void setIndsutry(String Indsutry) {
        this.Indsutry = Indsutry;
    }

    public String getContractor() {
        return Contractor;
    }

    public void setContractor(String Contractor) {
        this.Contractor = Contractor;
    }

    public String getPhone() {
        return Phone;
    }

    public void setPhone(String Phone) {
        this.Phone = Phone;
    }

    public String getIndrotuce() {
        return Indrotuce;
    }

    public void setIndrotuce(String Indrotuce) {
        this.Indrotuce = Indrotuce;
    }

    public String getLegalPerson() {
        return LegalPerson;
    }

    public void setLegalPerson(String LegalPerson) {
        this.LegalPerson = LegalPerson;
    }

    public String getRegisterTime() {
        return RegisterTime;
    }

    public void setRegisterTime(String RegisterTime) {
        this.RegisterTime = RegisterTime;
    }

    public String getRegisterMoney() {
        return RegisterMoney;
    }

    public void setRegisterMoney(String RegisterMoney) {
        this.RegisterMoney = RegisterMoney;
    }

    public String getManageState() {
        return ManageState;
    }

    public void setManageState(String ManageState) {
        this.ManageState = ManageState;
    }

    public String getCreditCode() {
        return CreditCode;
    }

    public void setCreditCode(String CreditCode) {
        this.CreditCode = CreditCode;
    }

    public String getDistance() {
        return Distance;
    }

    public void setDistance(String Distance) {
        this.Distance = Distance;
    }

    public String getLat() {
        return Lat;
    }

    public void setLat(String Lat) {
        this.Lat = Lat;
    }

    public String getLng() {
        return Lng;
    }

    public void setLng(String Lng) {
        this.Lng = Lng;
    }

    public String getServerPromise() {
        return ServerPromise;
//        String txt = TextUtils.isEmpty(ServerPromise) ? "" : "," + ServerPromise;
//        return "已测体温" + txt;
    }

    public void setServerPromise(String serverPromise) {
        ServerPromise = serverPromise;
    }

    public int getPageIndex() {
        return PageIndex;
    }

    public void setPageIndex(int PageIndex) {
        this.PageIndex = PageIndex;
    }

    public int getPageSize() {
        return PageSize;
    }

    public void setPageSize(int PageSize) {
        this.PageSize = PageSize;
    }

    public String getSortFiled() {
        return SortFiled;
    }

    public void setSortFiled(String SortFiled) {
        this.SortFiled = SortFiled;
    }

    public boolean isIsDesc() {
        return IsDesc;
    }

    public void setIsDesc(boolean IsDesc) {
        this.IsDesc = IsDesc;
    }

    public List<GoodsListModel> getGoodsList() {
        return GoodsList;
    }

    public void setGoodsList(List<GoodsListModel> goodsList) {
        GoodsList = goodsList;
    }

    public String getDistributiontype() {
        return Distributiontype;
    }

    public void setDistributiontype(String distributiontype) {
        Distributiontype = distributiontype;
    }

    public String getDistributionfeeStr() {
        return DistributionfeeStr;
    }

    public void setDistributionfeeStr(String distributionfeeStr) {
        DistributionfeeStr = distributionfeeStr;
    }

    /**
     * 获取星星数量
     *
     * @return
     */
    public float getStar() {
        if (TextUtils.isEmpty(StarNum)) {
            return 0f;
        }
        return Float.valueOf(StarNum);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {

        dest.writeString(ID);
        dest.writeString(Logo);
        dest.writeString(StoreName);
        dest.writeString(StarNum);
        dest.writeString(SaleNum);
        dest.writeString(StartPrice);
        dest.writeString(Distributionfee);
        dest.writeString(DistributionfeeStr);
        dest.writeString(Label);
        dest.writeString(Address);
        dest.writeString(RUserID);
        dest.writeString(Statu);
        dest.writeString(CMemo);
        dest.writeString(AreaName);
        dest.writeString(EnterNature);
        dest.writeString(LicenseUrl);
        dest.writeString(BrandName);
        dest.writeString(FullName);
        dest.writeString(Indsutry);
        dest.writeString(Contractor);
        dest.writeString(Phone);
        dest.writeString(Indrotuce);
        dest.writeString(LegalPerson);
        dest.writeString(RegisterTime);
        dest.writeString(RegisterMoney);
        dest.writeString(ManageState);
        dest.writeString(CreditCode);
        dest.writeString(Distance);
        dest.writeString(Lat);
        dest.writeString(Lng);
        dest.writeString(ServerPromise);
        dest.writeString(DiscountInfo);
        dest.writeString(RankInfo);
        dest.writeString(EvaluateStr);
        dest.writeInt(PageIndex);
        dest.writeInt(PageSize);
        dest.writeString(SortFiled);
        dest.writeByte((byte) (IsDesc ? 1 : 0));
        dest.writeString(Distributiontype);
        dest.writeTypedList(GoodsList);
        dest.writeInt(BusinessStatus);
        dest.writeString(DistanceStr);
    }


    //    String imgUrl;//商家头像
//    String name;//店铺名
//    float star;//星级
//    int num;//销售数量
//    String time;//配送时间
//    String juli;//配送距离
//    int qisong;//起送价格
//    String type;//配送价格
//    String label;//标签
//    List<ShopModel> shopModelList;//推荐商品
//
//    public HomeStoreModel(String name, float star, int num, String time, String juli, int qisong, String type, String label, List<ShopModel> list) {
//        this.name = name;
//        this.star = star;
//        this.num = num;
//        this.time = time;
//        this.juli = juli;
//        this.qisong = qisong;
//        this.type = type;
//        this.label = label;
//        this.shopModelList = list;
//    }
//
//    public String getImgUrl() {
//        return imgUrl;
//    }
//
//    public void setImgUrl(String imgUrl) {
//        this.imgUrl = imgUrl;
//    }
//
//    public String getName() {
//        return name;
//    }
//
//    public void setName(String name) {
//        this.name = name;
//    }
//
//    public float getStar() {
//        return star;
//    }
//
//    public void setStar(float star) {
//        this.star = star;
//    }
//
//    public int getNum() {
//        return num;
//    }
//
//    public void setNum(int num) {
//        this.num = num;
//    }
//
//    public String getTime() {
//        return time;
//    }
//
//    public void setTime(String time) {
//        this.time = time;
//    }
//
//    public String getJuli() {
//        return juli;
//    }
//
//    public void setJuli(String juli) {
//        this.juli = juli;
//    }
//
//    public int getQisong() {
//        return qisong;
//    }
//
//    public void setQisong(int qisong) {
//        this.qisong = qisong;
//    }
//
//    public String getType() {
//        return type;
//    }
//
//    public void setType(String type) {
//        this.type = type;
//    }
//
//    public String getLabel() {
//        return label;
//    }
//
//    public void setLabel(String label) {
//        this.label = label;
//    }
//
//    public List<ShopModel> getShopModelList() {
//        return shopModelList;
//    }
//
//    public void setShopModelList(List<ShopModel> shopModelList) {
//        this.shopModelList = shopModelList;
//    }


}
